import request from '@/config/axios'

// 用户店铺关联 VO
export interface UserShopsVO {
  id: number // 绑定编号
  userId: number // 用户ID
  shopId: number // 店铺ID
}

// 用户店铺关联 API
export const UserShopsApi = {
  // 查询用户店铺关联分页
  getUserShopsPage: async (params: any) => {
    return await request.get({ url: `/system/user-shops/page`, params })
  },

  // 查询用户店铺关联详情
  getUserShops: async (id: number) => {
    return await request.get({ url: `/system/user-shops/get?id=` + id })
  },

  // 新增用户店铺关联
  createUserShops: async (data: UserShopsVO) => {
    return await request.post({ url: `/system/user-shops/create`, data })
  },

  // 修改用户店铺关联
  updateUserShops: async (data: UserShopsVO) => {
    return await request.put({ url: `/system/user-shops/update`, data })
  },

  // 删除用户店铺关联
  deleteUserShops: async (id: number) => {
    return await request.delete({ url: `/system/user-shops/delete?id=` + id })
  },

  // 导出用户店铺关联 Excel
  exportUserShops: async (params) => {
    return await request.download({ url: `/system/user-shops/export-excel`, params })
  }
}